#include<bits/stdc++.h>
#define int long long
using namespace std;
inline int read(){
	int x=0;bool f=0;char ch=getchar();
	while(ch<'0'||ch>'9')f^=(ch=='-'),ch=getchar();
	while('0'<=ch&&ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
const int Maxn=3e6+5,mod=998244353;
int n,m,q,k;
int a[Maxn],cnt[Maxn];
int fac[Maxn],inv[Maxn];
inline int ksm(int a,int k){
	int res=1;for(;k;k>>=1,a=a*a%mod)if(k&1)res=res*a%mod;
	return res;
}
inline void init(int n){
	fac[0]=1;
	for(int i=1;i<=n;i++)fac[i]=fac[i-1]*i%mod;
	inv[n]=ksm(fac[n],mod-2);
	for(int i=n;i;i--)inv[i-1]=inv[i]*i%mod;
}
inline int C(int n,int m){
	return fac[n]*inv[n-m]%mod*inv[m]%mod;
}
int g[Maxn];

signed main(){
	freopen("sequence.in","r",stdin);
	freopen("sequence.out","w",stdout);
	n=read();m=read();q=read();k=read();
	if(q<m)puts("0"),exit(0);
	if(n<m)puts("0"),exit(0);
	init(3e6);
//	for(int i=1;i<=m;i++)a[i]=read();
	
	int res=0;
	
	for(int i=0;i<=m;i++){
		int tp=C(m,i)*ksm(n-i,q)%mod;
		if(i&1)res=(res+mod-tp)%mod;
		else res=(res+tp)%mod;
	}
	res=res*ksm(k,q-m)%mod;
	res=res*(n-m+1)%mod;
	printf("%lld\n",res);
	return 0;
}
/*
10 4 114 51419
19 2 3 4

10 3 114 51419
19 2 3


2 1 2 2
1
*/
